<?php

$traduccion = new Zend_Translate('array', APPLICATION_PATH . '/idiomas/es.php', 'es');  
Zend_Form::setDefaultTranslator($traduccion);  

class Application_Form_Mail extends Zend_Form
{
    protected function generaDecorador() {
         return array(
                    array('Errors',array('tag' => 'div')),
                    'ViewHelper',
                    'Description',
                    array('Label',array('class' => 'imitar_h2')),
                    array('HtmlTag', array('tag' => 'Fieldset', 'class' => 'elemento'))
                ); 
    }

    public function init()
    {
        $this->addElement('text', 'email', array(
            'label'      => 'Su dirección de correo electrónico:',
            'decorators' => $this->generaDecorador(),
            'required'   => true,
            'filters'    => array('StringTrim'),
            'validators' => array(
                'EmailAddress',
            )
        ));

        $this->addElement(
            'submit', 'Recordar', array('class' => 'btn btn-large btn-warning')
        );
        
        
        $this->setAttrib('class','form-inline');
        $this->setAction('/usuarios/recordar-clave');
        $this->setMethod('post');
                
    }
    
}

